acsccid: fix compilation with GCC15
authorRosen Penev <[email protected]>
Thu, 9 Oct 2025 18:31:10 +0000 (11:31 -0700)
committerTianling Shen <[email protected]>
Thu, 16 Oct 2025 17:39:03 +0000 (01:39 +0800)
Upstream backport.

Signed-off-by: Rosen Penev <[email protected]>
utils/acsccid/Makefile
utils/acsccid/patches/020-bool.patch [new file with mode: 0644]

index eceba4ea9a5ab9eb1b6ef83e946657fd95a5e255..83adc4aa3ae1968bb572d296ceccf12d6dc304e8 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=acsccid
 PKG_VERSION:=1.1.8
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/acshk/acsccid/tar.gz/v$(PKG_VERSION)?
diff --git a/utils/acsccid/patches/020-bool.patch b/utils/acsccid/patches/020-bool.patch
new file mode 100644 (file)
index 0000000..5f21dc5
--- /dev/null
@@ -0,0 +1,55 @@
+From b2c073a8f373e40c475aa130e8a9ca0814c080dd Mon Sep 17 00:00:00 2001
+From: Godfrey Chung <[email protected]>
+Date: Mon, 7 Sep 2020 14:57:28 +0800
+Subject: [PATCH] towitoko: do not use "bool" type.
+
+Merge from ccid 1.4.33.
+---
+ src/towitoko/atr.h     | 2 +-
+ src/towitoko/defines.h | 4 ----
+ src/towitoko/pps.c     | 4 ++--
+ 3 files changed, 3 insertions(+), 7 deletions(-)
+
+--- a/src/towitoko/atr.h
++++ b/src/towitoko/atr.h
+@@ -82,7 +82,7 @@ typedef struct
+   struct
+   {
+     BYTE value;
+-    bool present;
++    int present;
+   }
+   ib[ATR_MAX_PROTOCOLS][ATR_MAX_IB], TCK;
+   unsigned pn;
+--- a/src/towitoko/defines.h
++++ b/src/towitoko/defines.h
+@@ -48,9 +48,5 @@
+ #include <wintypes.h>
+-#ifndef __cplusplus
+-typedef int                bool;
+-#endif
+-
+ #endif /* DEFINES_H */
+--- a/src/towitoko/pps.c
++++ b/src/towitoko/pps.c
+@@ -41,7 +41,7 @@
+  * Not exported funtions declaration
+  */
+-static bool PPS_Match (BYTE * request, unsigned len_request, BYTE * reply, unsigned len_reply);
++static int PPS_Match (BYTE * request, unsigned len_request, BYTE * reply, unsigned len_reply);
+ static unsigned PPS_GetLength (BYTE * block);
+@@ -91,7 +91,7 @@ PPS_Exchange (int lun, BYTE * params, un
+   return ret;
+ }
+-static bool
++static int
+ PPS_Match (BYTE * request, unsigned len_request, BYTE * confirm, unsigned len_confirm)
+ {
+   /* See if the reply differs from request */